package hz.mobileproject.pda.model.attendancemanager.adapter;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import org.xutils.view.annotation.ViewInject;

import hz.mobileproject.pda.R;
import hz.mobileproject.pda.model.attendancemanager.bean.Rp_queryWork;
import hz.mobileproject.pda.ui.base.BaseCustomAdapter;

public class AttendanceMsgLvAdapter extends BaseCustomAdapter<Rp_queryWork.Data,AttendanceMsgLvAdapter.VH> {


    public AttendanceMsgLvAdapter(Context mContext) {
        super(mContext);
    }

    @Override
    protected int bindView() {
        return R.layout.item_attendance_msg_lv;
    }

    @Override
    protected VH createViewHolder() {
        return new VH();
    }

    @Override
    protected void bindData(int position, View convertView, VH vh) {
        Rp_queryWork.Data data = mList.get(position);
        vh.tv_police_name.setText(data.police_name);
        vh.tv_police_dept.setText(data.dept_name);
        vh.tv_police_work_date.setText(data.work_date);
        vh.tv_go_work.setText(data.on_time);
        vh.tv_off_work.setText(data.out_time);
    }

    class VH{
        @ViewInject(R.id.tv_police_name)
        private TextView tv_police_name;
        @ViewInject(R.id.tv_police_dept)
        private TextView tv_police_dept;
        @ViewInject(R.id.tv_police_work_date)
        private TextView tv_police_work_date;
        @ViewInject(R.id.tv_go_work)
        private TextView tv_go_work;
        @ViewInject(R.id.tv_off_work)
        private TextView tv_off_work;

    }
}
